﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ProgNetComponents.Design.Attributes;
using System.ComponentModel;

namespace ProgNetDxComponents.ExtenderProviders.Settings
{
    public class NullInputSettings : ProgNetComponents.ExtenderProviders.Settings.BaseExtenderSettings
    {
        public NullInputSettings(object owner, ProgNetComponents.ExtenderProviders.BaseExtenderProvider provider)
            : base(owner, provider)
        {
            ClearType = Settings.ClearType.SetNull;
        }

        private bool _ClearOnDelete = true;

        [RefreshProperties(System.ComponentModel.RefreshProperties.All)]
        public bool ClearOnDelete
        {
            get { return _ClearOnDelete; }
            set
            {
                _ClearOnDelete = value;
                OnSettingsChanged();
            }
        }

        [DynamicBrowsableByProperty("ClearOnDelete", true)]
        public ClearType ClearType
        {
            get;
            set;
        }
    }

    public enum ClearType
    {
        SetNull,
        SetEmptyString
    }
}
